Class Objects.Camera

Basic cameras that can point at Lara or at a CAMERA_TARGET.

Functions

Camera:GetPosition() Get the camera's position
Camera:SetPosition(position) Set the camera's position
Camera:GetName() Get the camera's unique string identifier
Camera:SetName(name) Set the camera's name (its unique string identifier)
Camera:GetRoom() Get the current room of the camera
Camera:SetRoom(ID) Set room of camera This is used in conjunction with SetPosition to teleport the camera to a new room.


Functions

Camera:GetPosition()
Get the camera's position

Returns:

    Vec3 a copy of the camera's position
Camera:SetPosition(position)
Set the camera's position

Parameters:

  • position Vec3 the new position of the camera
Camera:GetName()
Get the camera's unique string identifier

Returns:

    string the camera's name
Camera:SetName(name)
Set the camera's name (its unique string identifier)

Parameters:

  • name string The camera's new name
Camera:GetRoom()
Get the current room of the camera

Returns:

    int number representing the current room of the camera
Camera:SetRoom(ID)
Set room of camera This is used in conjunction with SetPosition to teleport the camera to a new room.

Parameters:

  • ID int the ID of the new room
generated by LDoc 1.4.6 Last updated 2022-12-16 18:35:53